<?php
class Module_m extends MY_Model{
	
	function __construct(){
		parent::__construct();
		$this->_table = 'modules';
	}
	
	//ADMIN
	function get_all_type( $type = 1){ //1: top
		$this->db->where('type',$type);
		$this->db->where('status',1);
		return parent::get_all();
	}
	
	function get_all($param = array()){ //1 :active 0 : chua active
		if(!empty($param['not_system'])){
			$this->db->where_not_in('system',$param['not_system']);
		}
		$this->order_by('status');
		$this->order_by('system');
		return parent::get_all();
	}
	function status($id,$data){
		parent::update($id,$data);
	}
	
}